package Envo 
{
	import flash.display.Loader;
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	import flash.events.ProgressEvent;
	import flash.text.TextField;
	import com.as3toolkit.events.KeyboarderEvent;
	import com.as3toolkit.ui.Keyboarder;
	
	/**
	 * @author Sam Morrison
	 */
	public class Document extends MovieClip
	{
		private var game:Game;						// Game object
		public var kb:Keyboarder;					// Keyboarder object
		
		public function Document() 
		{
			addEventListener(Event.ADDED_TO_STAGE, addedToStage);
		}
		
		private function addedToStage(e:Event):void
		{
			// Instantiate a new Keyboarder Class
			kb = new Keyboarder(this);
			
			// Create new game
			game = new Game();
			addChild(game);
			game.start();
			
			removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
		}
		
	}

}